package fr.upstlse.glre.client.vo.actualite;

import java.util.Date;

import com.extjs.gxt.ui.client.widget.Html;

import fr.upstlse.glre.client.vo.user.UserVOGWT;

public class ActualiteVOGWT implements java.io.Serializable
{
    /**
     * The serial version UID of this class. Needed for serialization.
     */
    private static final long serialVersionUID = 4773601560845241248L;
    
    private long id;

    private String titre;

    private java.lang.String contenu;

    private Date date;

    private UserVOGWT userVOGWT;

    public ActualiteVOGWT()
    {
        this.id = 0;
        this.titre = null;
        this.contenu = null;
        this.date = null;
        this.userVOGWT = null;
    }

    public ActualiteVOGWT(long pId, String pTitre, String pContenu, Date pDate, UserVOGWT pUserVOGWT)
    {
        this.id = pId;
        this.titre = pTitre;
        this.contenu = pContenu;
        this.date = pDate;
        this.userVOGWT = pUserVOGWT;
    }

	public long getId() {
		return id;
	}

	public void setId(long pId) {
		id = pId;
	}

	public String getTitre() {
		return titre;
	}

	public void setTitre(String pTitre) {
		titre = pTitre;
	}

	public java.lang.String getContenu() {
		return contenu;
	}

	public void setContenu(java.lang.String pContenu) {
		contenu = pContenu;
	}

	public java.util.Date getDate() {
		return date;
	}

	public void setDate(java.util.Date pDate) {
		date = pDate;
	}

	public UserVOGWT getUserVOGWT() {
		return userVOGWT;
	}

	public void setUserVOGWT(UserVOGWT pUserVOGWT) {
		userVOGWT = pUserVOGWT;
	}
	
	public Html getHtml() {
		String lRes = "";
		lRes+= "<p>" + getTitre() + "</p>";
		lRes+= "<p>" + getContenu() + "</p>";
		lRes+= "<p>" + getDate() + "</p>";
		lRes+= "<p>" + getUserVOGWT().getHtml().getHtml() + "</p>";
		
		Html lHtml = new Html();
		lHtml.setHtml(lRes);
		return lHtml;
	}
}
